package com.itheima.edu.info.manager.domain;

import java.io.Serializable;


//用于封装数据的JavaBean类
public class Student extends Person implements Serializable,Comparable<Student>{
    private static final long serialVersionUID = 42L;


    // 父类的构造方法不能被子类继承

    public Student() {
        super();
    }

    public Student(String sid, String name, String age, String birthday) {
        super(sid, name, age,birthday);
    }

    @Override
    public String toString() {
        return getSid()+","+getName()+","+getAge()+","+getBirthday();
    }


    @Override
    public int compareTo(Student o) {
        int i = Integer.parseInt(this.getAge()) - Integer.parseInt(o.getAge());
        return i;
    }
}
